home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / hsrc_117.zip / DORCPT.C < prev    next >
Text File  |  1990-11-14  |  1KB  |  52 lines

  1. #include "msgg.h"
  2. #include "twindow.h"
  3. #include "keys.h"
  4. #include "headedit.h"
  5.  
  6. extern WINDOW *ewnd;
  7.  
  8.  
  9. void pascal do_recpt (void) {
  10.  
  11.   /* Handle MSGRRQ (return recpt request) bit */
  12.  
  13.   if(msg.attr & MSGRRQ) {
  14.     if ((currarea->attr & NET) || (currarea->attr & ALTERNATE)) {
  15.         any_message(" Return Receipt Requested...shall I send one? (y/N) ");
  16.         if(toupper(generic_mouse_input(ewnd))=='Y') {
  17.  
  18.             word tempmess;
  19.             char tempstr[81];
  20.             int temphandle;
  21.  
  22.             tempmess=messno;
  23.             msg.attr = MSGCPT | MSGLOCAL | MSGKILL | MSGPRIVATE;
  24.             strncpy(msg.to,msg.from,36);
  25.             msg.to[35]=0;
  26.             strncpy(msg.to,name,36);
  27.             sprintf(tempstr,"\rMsg dated %s was received.\r",msg.date);
  28.             strcpy(msg.date,fidodate());
  29.             msg.d_zone=msg.o_zone;
  30.             msg.dest=msg.orig;
  31.             msg.d_point=msg.o_point;
  32.             msg.dest_net=msg.orig_net;
  33.             msg.o_zone=curaddress.zone;
  34.             msg.orig=curaddress.node;
  35.             msg.orig_net=curaddress.net;
  36.             msg.o_point=curaddress.point;
  37.             get_rid();
  38.             temphandle=_creat("MSGTMP",O_RDWR | O_BINARY | O_DENYNONE);
  39.             if(temphandle!= -1) {
  40.                 ffprintf(temphandle,"%s",tempstr);
  41.                 _close(temphandle);
  42.                 post_mess("MSGTMP");
  43.             }
  44.             messno=tempmess;
  45.             get_mess(0);
  46.         }
  47.         clear_message();
  48.         msg.attr &= (~MSGRRQ);
  49.         put_mess();
  50.     }
  51.   }
  52. }